/*
 * Wenjiankongzhi.h
 *
 *  Created on: 2022年7月13日
 *      Author: wocao
 */
#include "../../cunchuti/kongzhi/Kongzhi.h"
#include "../Wenjian.h"
#include "../wenjian_impl/Wenjianimpl1.h"
#include "../../cache/rw_status_cache/RWstatuscache.h"
#include "../../cache/rw_status_cache/annular_cache/Annularcache.h"
#include <map>
#include <time.h>
#include "../../tools/TF_file.hpp"
#ifndef WENJIANCENG_KONGZHI_WENJIANKONGZHI_H_
#define WENJIANCENG_KONGZHI_WENJIANKONGZHI_H_

class Wenjian_kongzhi {
protected:
	Kongzhi *pkongzhi;						//存儲體控制基類
	string *dir = new string("/");		//當前目錄，默認為“gen”
	map<string, Wenjian> dir_map;			//當前目錄中的數據
public:
	virtual ~Wenjian_kongzhi() = 0;
	virtual void add_file(RW_status_cache &rwcache, Wenjian *wenjian) = 0;
	virtual long get_file(RW_status_cache &rwcache,
			const string &file_name) = 0;
	virtual void rem_file(const string &file_name) = 0;
	virtual void create_dir(const string &new_dir) = 0;
	virtual void dir_zhuanhuan(const string &dir) = 0;
	virtual void dir_zhuanhuan_gen() = 0;
	virtual void dir_zhuanhuan_xiangdui(const string &dir) = 0;
	virtual void dir_zhuanhuan_juedui(const string &dir) = 0;
	virtual long get_kuai_size(long size) = 0;
	virtual void replace_dir() = 0;
	virtual void add_file_dir(Wenjian *wenjian) = 0;
	virtual void red_file_dir(const string &file_name) = 0;
	virtual unsigned long bianli_dir(char **buf) = 0;
};

#endif /* WENJIANCENG_KONGZHI_WENJIANKONGZHI_H_ */
